<template>
    <viewer :images="images" style="height:800px;">
        <img v-for="item in images" alt="图片" :src="item.src"
            :key="item.index" class="image"
        >
    </viewer>
</template>
<script>
export default {
    name:"imageViewer",
    props:{
        image:String
    },
    computed:{
        images(){
            return this.image ? [{src:this.image}] : [];
        }
    }
}
</script>
<style lang="less" scoped>

.image{
    display:block;
    width:auto;
    height:100%;
    margin:0 auto;
}
</style>
<style>
.viewer-container{
    z-index:2500 !important;
}
</style>